
public class DataTypeRangesApp {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		System.out.println("Tipo\t\tRango");
		System.out.println("--------------------------------------------");
		System.out.println("int\t\t["+Integer.MIN_VALUE+", "+Integer.MAX_VALUE+"]");
		System.out.println("long\t\t["+Long.MIN_VALUE+", "+Long.MAX_VALUE+"]");		
		System.out.println("float\t\t["+Float.MIN_VALUE+", "+Float.MAX_VALUE+"]");
		System.out.println("double\t\t["+Double.MIN_VALUE+", "+Double.MAX_VALUE+"]");		
		
		System.out.println();
		
		int bitsInteger = (int) Math.ceil(Math.log10(Integer.MAX_VALUE)/Math.log10(2));
		int bitsLong = (int) Math.ceil(Math.log10(Long.MAX_VALUE)/Math.log10(2));
		System.out.println("Tipo\t\tBits");
		System.out.println("--------------------------------------------");		
		System.out.println("int\t\t"+(bitsInteger+1));
		System.out.println("long\t\t"+(bitsLong+1));
	}

}
